﻿using CkSoftware.GroupMe.Sdk.Core.Dao;

namespace CkSoftware.GroupMe.Sdk.Helpers.Emoji
{
	/// <summary>
	/// Emoji data containing all information to display a correct emoticon image.
	/// </summary>
	public class GroupMeEmojiImage
	{
		/// <summary>
		/// The default emoji image width.
		/// </summary>
		public const int DefaultEmojiWidth = 40;

		/// <summary>
		/// The default emoji image height.
		/// </summary>
		public const int DefaultEmojiHeight = 40;

		private int _iconHeight = DefaultEmojiHeight;
		private int _iconWidth = DefaultEmojiWidth;

		/// <summary>
		/// The image url of the pack-sprite image.
		/// </summary>
		public string PackSpriteImageUrl { get; set; }

		/// <summary>
		/// The position of the emoji image from the top (in pixel). The point 0/0 is in the top left corner of the sprite image.
		/// </summary>
		public int TopPosition { get; set; }

		/// <summary>
		/// The position of the emoji image from the left (in pixel). The point 0/0 is in the top left corner of the sprite image.
		/// </summary>
		public int LeftPosition { get; set; }

		/// <summary>
		/// The width of the emoji image (in pixel).
		/// </summary>
		public int IconWidth
		{
			get { return _iconWidth; }
			set { _iconWidth = value; }
		}

		/// <summary>
		/// The height of the emoji image (in pixel).
		/// </summary>
		public int IconHeight
		{
			get { return _iconHeight; }
			set { _iconHeight = value; }
		}

		/// <summary>
		/// The original definition object (for access to the pack-id and emoji id properties).
		/// </summary>
		public GroupMeEmojiDefinition Definition { get; set; }
	}
}